<?php
	class LoginView{
		private $m_username = "username";
		private $m_password = "password";
		private $m_login = "login";
		private $m_logout = "logout";
		
		function DoLoginBox(){
			$DoLogin = NULL;
			$DoLogin .= "<form name='loginform' method='get'>";
			$DoLogin .= 	"<input type='text' name='$this->m_username'>";
			$DoLogin .= 	"<input type='password' name='$this->m_password'>";
			$DoLogin .= 	"<input type='submit' name='$this->m_login' value='Login'>";
			$DoLogin .= "</form>";
			return $DoLogin;
		}
		
		function DoLogoutbox(){
			$DoLogout = NULL;
			$DoLogout .= "<form name='logoutform' method='get'>";
			$DoLogout .= 	"<input type='submit' name='$this->m_logout' value='Logout'>";
			$DoLogout .= "</form>";
			
			return $DoLogout;
		}
		
		function GetUserName(){
			$username = $_GET['$this->m_username'];
			if( $username != ""){
				return $username;
			}
			else{
				return NULL;
			}
		}
		
		function GetPassword(){
			$password = $_GET['$this->m_password'];
			if($password != ""){
				return $_GET['$this->m_password'];
			}
			return NULL;
		}
		
		function TriedToLogin(){
			if(isset($_GET['$this->m_login'])){
				return true;
			}
			else{
				return false;	
			}
		}
		function TriedToLogout(){
			if(isset($_GET['$this->m_logout'])){
				return true;
			}
			else{
				return false;	
			}
		}
	}
	
?>